""" Counter函数和enumerate函数 """
def firstUniqChar(s: str) -> int:
    freq = collections.Counter(s)
    for i, ch in enumerate(s):
        if freq[ch] == 1:
            return i 
    return -1